<template>
  <div class="advance_pary pdlr-17">
    <yearHeader @confirm-year="confirmYear" :year="year"></yearHeader>
    <hornor-bg>
      <recognitionPandent v-for="item in persons">
        <span>{{ item.partyname }}</span>
      </recognitionPandent>
    </hornor-bg>
  </div>
</template>

<script setup lang='ts'>
import { onMounted, ref } from 'vue';
import recognitionPandent from '@/components/recognitionPandent/recognitionPandent.vue'
import hornorBg from '../hornorBg/hornorBg.vue'
import { getExcellentOrg } from '@/api/vanguradPosition';
import yearHeader from '../yearHeader/yearHeader.vue'
import { IAction } from '@/pages/pay/type';
import useYearHooks from '../../hooks/useYearHooks';
const { persons, year, getData } = useYearHooks(getExcellentOrg)
onMounted(() => {
  getData()
})

function confirmYear(data: IAction) {
  year.value = String(data.text)
  getData()
}
</script>

<style lang="less" scoped>
.advance_pary {
  background: url('@/assets/img/xjd_bg.png') no-repeat center;
  background-size: 100% 100%;
  box-sizing: border-box;
  height: 100%;
  overflow: auto;

  .year {}
}
</style>
<style lang="less">
.advance_pary {
  .hornor_bg {
    display: flex;
    flex-wrap: wrap;
    align-content: start;
    justify-content: center;
    padding: 20px 0;
    box-sizing: border-box;
  }
}
</style>